// @/api/k8sDaemonSet.js
import request from '@/utils/request'

export function getDaemonSetList(nameSpace) {
  return request({
    url: `/k8s/daemonset/getDaemonSetList/${nameSpace}`,
    method: 'get'
  })
}

export function createDaemonSet(nameSpace, data) {
  return request({
    url: `/k8s/daemonset/createDaemonSet/${nameSpace}`,
    method: 'post',
    data: data,
    headers: {
      'Content-Type': 'application/json'
    }
  })
}

export function updateDaemonSet(nameSpace, daemonSetName, data) {
  return request({
    url: `/k8s/daemonset/updateDaemonSet/${nameSpace}/${daemonSetName}`,
    method: 'put',
    data: data,
    headers: {
      'Content-Type': 'application/json'
    }
  })
}

export function deleteDaemonSet(nameSpace, daemonSetName) {
  return request({
    url: `/k8s/daemonset/delDaemonSet/${nameSpace}/${daemonSetName}`,
    method: 'delete'
  })
}
